In recent microprocessors, high-speed memory access from a microprocessor is facilitated by placing a low capacity, high-speed cache memory, which is configured from an SRAM (Static Random Access Memory) for example, inside or near the microprocessor, and storing a part of data in the cache memory.
In a computer system, in the case where a mishit occurs in a read access or write access, from a central processing unit to the cache memory, a part of data that is newly read from a main memory is stored, as an entry (a registered item), in an empty block of the cache memory. At this time, when no block is empty, it becomes necessary to carry out an entry replacement process in which any one from among plural blocks is selected, and the entry stored in the selected block is returned to the main memory so as to empty such block, then the newly read data is stored into the emptied block. In the aforementioned entry replacement process, a method which selects a block storing data least recently referred to, in other words an LRU (Least Recently Used) decoding scheme, is generally adopted. With this LRU decoding scheme, the utilization efficiency of the cache memory improves and, as a result, the execution speed of the microprocessor improves.
Among programs processed by the microprocessor, there are special processes which are accessed infrequently but require high-speed processing once initiated, and there are processes which are accessed frequently but do not require much execution speed.
In response to this, for example, the cache memory is provided with a freeze function in the conventional technology such as in Patent Reference 1. The freeze function is a function which copies, beforehand, into the cache memory, a program which is accessed infrequently but requires high-speed processing once initiated, and which prohibits the rewriting of such area. By having this function, a computer system can, when necessary, read a program from the cache memory then execute it, thereby reducing execution time. Furthermore, a purge function is a function which does not store, into the cache memory, data or a program which are accessed frequently but do not require much execution speed so as to release such area. By having this function, an allowance is created in the cache memory and other programs and data having higher priority can be loaded into the cache memory, thereby improving the utilization efficiency of the cache memory and reducing overall execution time.
Patent Reference 1: Japanese Laid-Open Patent Application No. 2000-200221 Publication